package com.hdax.dmw.order.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hdax.dmw.entity.order.Order;
import com.hdax.dmw.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = "/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @PostMapping(path = "/detail")
    public Order detail(@RequestParam("orderNo")String orderNo){
        return orderService.getOne(new QueryWrapper<Order>().eq("orderNo", orderNo));
    }
}
